<template>
  <b-col>
    <!-- 一行番剧 -->
    <b-row v-for="l in list.data" :key="l+createId()" class="pt-2 px-3 pb-1">
      <BangumiInfo :data="l" />
    </b-row>
    <b-row v-if="list.total == 0">
      <b-col class="text-center">
        <h5>
          他没有追番哦
        </h5>
      </b-col>
    </b-row>
  </b-col>
</template>
<script>
import { nanoid } from 'nanoid';
import BangumiInfo from './BangumiInfo'
export default {
  components: {
    BangumiInfo
  },
  data() {
    return {
      list: {
        data: null,
      },
    }
  },
  mounted() {
    this.$httpUser.getUserBangumiList(1, this.$route.query.id).then((res) => {
      console.log(res);
      this.list = res;
    }).catch((err) => {
      console.log(err);
    });
  },
  methods: {
    //创建唯一id
    createId() {
      return nanoid(4);
    }
  },
}
</script>
<style scoped>
</style>
